package com.googlecode.utterlyidle.rendering;

import com.googlecode.totallylazy.Value;

public class ViewName implements Value<String> {
    private final String value;

    private ViewName(final String value) {
        this.value = value;
    }

    public static ViewName viewName(final String value) {
        return new ViewName(value);
    }

    @Override
    public String value() {
        return value;
    }

    @Override
    public boolean equals(final Object obj) {
        if (obj == null || !(obj instanceof ViewName)) return false;
        return value.equals(((ViewName) obj).value);
    }

    @Override
    public int hashCode() {
        return value.hashCode();
    }

    @Override
    public String toString() {
        return value;
    }
}
